package com.example.mydesignmodule.zhuangshi;

/**
 * @author tgw
 * @date 2021/3/11
 * @describe  装饰模式
 */
class ComponentRunMain {

    public static void main(String[] args) {

        ConcreateComponent concreateComponent =  new ConcreateComponent();
        Decorator componentA = new ConcreteComponentA(concreateComponent);
        componentA.operate();

        Decorator componentB = new ConcreteComponentB(concreateComponent);
        componentB.operate();
    }
}
